package other;

import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ConstructTest {
    private Map<String, String> keyMap;
    public static void main(String[] args) {
        ConstructTest constructTest = new ConstructTest();
        System.out.println(constructTest.getTypeVal(2));
    }
    public ConstructTest(){
//        speak("hello");
//        initMap();
    }
    public void initMap(){
        keyMap = new HashMap<>();
        keyMap.put("hello", "world");
    }
    private void speak(String hello) {
        System.out.println(hello);
    }
    public String getTypeVal(int val){
        HashMap<String, List<Integer>> pannelTypeMap = new HashMap<>();
        pannelTypeMap.put("one", Arrays.asList(2, 7));
        pannelTypeMap.put("two", Arrays.asList(3, 8));
        pannelTypeMap.put("three", Arrays.asList(5, 10));
        for (String key : pannelTypeMap.keySet()) {
            if(pannelTypeMap.get(key).contains(val)) return key;
        }
        return "null";
    }
}
